/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Andre
 */
@Entity
@Inheritance(strategy= InheritanceType.JOINED)
@Table(name = "titulopagar")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Titulopagar.findAll", query = "SELECT t FROM Titulopagar t")})
public class Titulopagar extends Titulo implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @ManyToMany(mappedBy = "titulopagarList")
    private List<Condicoescompra> condicoescompraList;
    
    @ManyToMany(mappedBy = "titulopagarList")
    private List<Folha> folhaList;

    public Titulopagar() {
    }

    public Titulopagar(TituloPK tituloPK) {
        super(tituloPK);
    }

    public Titulopagar(int idTitulo, int parcela) {
        super(idTitulo, parcela);
    }
    
    public Titulopagar(TituloPK tituloPK, Date emissao, Date vencimento, double valor, double desconto){
        super(tituloPK, emissao, vencimento, valor, desconto);
    }

    @XmlTransient
    public List<Condicoescompra> getCondicoescompraList() {
        return condicoescompraList;
    }

    public void setCondicoescompraList(List<Condicoescompra> condicoescompraList) {
        this.condicoescompraList = condicoescompraList;
    }

    @XmlTransient
    public List<Folha> getFolhaList() {
        return folhaList;
    }

    public void setFolhaList(List<Folha> folhaList) {
        this.folhaList = folhaList;
    }
    
}
